import HttpRequest from "@/lib/axios.js";
import qs from "query-string";
// import moment from "moment";
class ShareModel extends HttpRequest {
  constructor() {
    super();
  }
  _getShare({ share_id = "98281013301488284", type = 2 }) {
    let data = qs.stringify({
      shareId: share_id,
      type
    });
    return this.axios({
      url: "/user/share/commom/getShare",
      method: "post",
      data
    });
  }
  _addPushUser({
    shopId = 98281013301482481,
    nikeName,
    sex = 1,
    mobile,
    orderDate,
    reachTime,
    shareId,
    type
  }) {
    /* let params = qs.stringify({
      shopId,
      nikeName,
      sex,
      mobile,
      orderDate,
      reachTime,
      shareId,
      type
    }); */
    return this.axios({
      url: "/user/share/commom/addPushUser",
      method: "get",
      params: {
        "model1.shopId": shopId,
        "model1.nikeName": nikeName,
        "model1.sex": sex,
        "model1.mobile": mobile,
        "model1.orderDate": orderDate,
        "model1.reachTime": reachTime,
        shareId,
        type
      }
    });
  }
}

export default ShareModel;
